package com.yang.service;

import com.yang.entity.Order;
import com.yang.dao.OrderDao;

import java.util.*;

public class OrderService {
    private final OrderDao orderDao = new OrderDao();

    //查询全部
    public List<Order> queryOrder() {
        return orderDao.queryOrder();
    }

    //单个查询
    public Order queryOrderById(String id) {
        return orderDao.queryOrderById(id);
    }

    //添加
    public int saveOrder(Order obj) {
        return orderDao.saveOrder(obj);
    }

    //删除
    public int deleteOrderById(String id) {
        return orderDao.deleteOrderById(id);
    }

    //修改
    public int updateOrderById(Order obj) {
        return orderDao.updateOrderById(obj);
    }
}
